//
//  RACNetworking.h
//  VET
//
//  Created by Lam on 16/7/1.
//  Copyright © 2016年 user. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ReactiveObjC.h>

@interface RACNetworking : NSObject

UIKIT_EXTERN NSString * const kHeaderKey;

SingletonH

#pragma mark - 网络请求

/**
 GET /getUser/1
 POST /createUser
 PUT /updateUser/1
 DELETE /deleteUser/1
 **/

/** get 请求 */
- (RACSignal*)getURL:(NSString*)url whitParams:(NSDictionary *)params;

/** post 请求 */
- (RACSignal*)postURL:(NSString*)url whitParams:(NSDictionary *)params;

/** put 请求 */
- (RACSignal*)putURL:(NSString*)url whitParams:(NSDictionary *)params;

/** delete 请求 */
- (RACSignal*)deleteURL:(NSString*)url whitParams:(NSDictionary *)params;

/** patch 请求 */
- (RACSignal*)patchURL:(NSString*)url whitParams:(NSDictionary *)params;

/** 上传图片 */
- (RACSignal*)uploadImgWithUrl:(NSString*)url params:(NSDictionary *)params img:(UIImage*)image imgPath:(NSString*)path apiKey:(NSString*)key;

#pragma mark - 实时检测网络状态

+ (void)startMonitoring;
+ (void)stopMonitoring;

@end







